import functools

def log(func):
    def wrapper(*args,**kw):
        print('dsada')
        return func(*args,**kw)
    return wrapper


class A():
    def __init__(self):
        pass

    def log1(self,text):
        def log(func):
            @functools.wraps(func)
            def wrapper(*args,**kw):
                print('该函数名是%s'%func.__name__)
                return func(*args,**kw)
            return wrapper
        return log



a = A()
@a.log1('你')
def m():
    print('测试')

if __name__ == '__main__':
    m()